import * as MessageTray from './messageTray.js';
import * as SwipeTracker from './swipeTracker.js';
import {formatDateWithCFormatString} from '../misc/dateUtils.js';
+import {TimeLimitsState} from '../misc/timeLimitsManager.js';
import * as AuthPrompt from '../gdm/authPrompt.js';
import {AuthPromptStatus} from '../gdm/authPrompt.js';
import {MprisSource} from './mpris.js';
this._updateUserSwitchVisibility();
+ // When parental controls session limits are enabled, the screen will be
+ // locked upon reaching the time limit. In those cases, tweak the lock screen,
+ // so that the children cannot unlock without parental supervision.
+ Main.timeLimitsManager.connectObject(
+ 'notify::state', () => this._updateAuthBlocked(),
+ this);
+ this._updateAuthBlocked();
+
// Main Box
const mainBox = new St.Widget();
mainBox.add_constraint(new Layout.MonitorConstraint({primary: true}));
this._authPrompt.updateSensitivity(
verificationStatus === AuthPromptStatus.NOT_VERIFYING);
}
+
+ this._updateAuthBlocked();
}
_maybeDestroyAuthPrompt() {
!this._lockdownSettings.get_boolean('disable-user-switching');
}
+ _updateAuthBlocked() {
+ this._authPrompt?.setAuthBlocked(
+ Main.timeLimitsManager.state === TimeLimitsState.LIMIT_REACHED);
+ }
+
cancel() {
if (this._authPrompt)
this._authPrompt.cancel();